home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / gadget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-08  |  7.2 KB  |  148 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AGadget wrapper class                                                     *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_Gadget_H
  12. #define ASAP_Gadget_H
  13.  
  14. extern "C"
  15. {
  16.  #include <Proto/GadTools.h>
  17.  #include <Proto/Intuition.h>
  18. }
  19.  
  20. class ARastPort;
  21.  
  22. class AGadget : public Gadget
  23. {
  24.  public:
  25.  inline BOOL ActivateGadget(Window * window, Requester * requester);
  26.  inline static AGadget * CreateContext(Gadget **glistptr);
  27.  inline static AGadget * CreateGadget(unsigned long kind, Gadget * gad, NewGadget * ng, Tag tag1,  ...);
  28.  inline static AGadget * CreateGadgetA(unsigned long kind, Gadget * gad, NewGadget * ng, TagItem * taglist);
  29.  inline ULONG DoGadgetMethod(Window * win, Requester * req, unsigned long MethodID,  ...);
  30.  inline ULONG DoGadgetMethodA(Window * win, Requester * req, Msg message);
  31.  inline static void FreeGadgets(Gadget *glistptr);
  32.  inline LONG GT_GetGadgetAttrs(Window * win, Requester * req, Tag tag1,  ...);
  33.  inline LONG GT_GetGadgetAttrsA(Window * win, Requester * req, TagItem * taglist);
  34.  inline void GT_SetGadgetAttrs(Window * win, Requester * req, Tag tag1,  ...);
  35.  inline void GT_SetGadgetAttrsA(Window * win, Requester * req, TagItem * taglist);
  36.  inline void GadgetMouse(GadgetInfo * gInfo, WORD * mousePoint);
  37.  inline void ModifyProp(Window * window, Requester * requester, unsigned long flags, unsigned long horizPot, unsigned long vertPot, unsigned long horizBody, unsigned long vertBody);
  38.  inline void NewModifyProp(Window * window, Requester * requester, unsigned long flags, unsigned long horizPot, unsigned long vertPot, unsigned long horizBody, unsigned long vertBody, long numGad);
  39.  inline void OffGadget(Window * window, Requester * requester);
  40.  inline void OnGadget(Window * window, Requester * requester);
  41.  inline void RefreshGList(Window * window, Requester * requester, long numGad);
  42.  inline void RefreshGadgets(Window * window, Requester * requester);
  43.  inline ULONG SetGadgetAttrs(Window * window, Requester * requester, unsigned long tag1,  ...);
  44.  inline ULONG SetGadgetAttrsA(Window * window, Requester * requester, TagItem * tagList);
  45. };
  46. //----------------------------------------------------------------------------
  47. BOOL AGadget::ActivateGadget (Window * window, Requester * requester)
  48. {
  49.  return ::ActivateGadget(this, window, requester);
  50. }
  51. //----------------------------------------------------------------------------
  52. AGadget * AGadget::CreateContext (Gadget **glistptr)
  53. {
  54.  glistptr = 0; return (AGadget *) ::CreateContext(glistptr);
  55. }
  56. //----------------------------------------------------------------------------
  57. AGadget * AGadget::CreateGadget (unsigned long kind, Gadget * gad, NewGadget * ng, Tag tag1,  ...)
  58. {
  59.  return AGadget::CreateGadgetA(kind, gad, ng, (TagItem *) &tag1);
  60. }
  61. //----------------------------------------------------------------------------
  62. AGadget * AGadget::CreateGadgetA (unsigned long kind, Gadget * gad, NewGadget * ng, TagItem * taglist)
  63. {
  64.  return (AGadget *) ::CreateGadgetA(kind, gad, ng, taglist);
  65. }
  66. //----------------------------------------------------------------------------
  67. ULONG AGadget::DoGadgetMethod (Window * win, Requester * req, unsigned long MethodID,  ...)
  68. {
  69.  return ::DoGadgetMethod(this, win, req, MethodID);
  70. }
  71. //----------------------------------------------------------------------------
  72. ULONG AGadget::DoGadgetMethodA (Window * win, Requester * req, Msg message)
  73. {
  74.  return ::DoGadgetMethodA(this, win, req, message);
  75. }
  76. //----------------------------------------------------------------------------
  77. void AGadget::FreeGadgets (Gadget *glistptr)
  78. {
  79.  ::FreeGadgets(glistptr);
  80. }
  81. //----------------------------------------------------------------------------
  82. LONG AGadget::GT_GetGadgetAttrs (Window * win, Requester * req, Tag tag1,  ...)
  83. {
  84.  return ::GT_GetGadgetAttrs(this, win, req, tag1);
  85. }
  86. //----------------------------------------------------------------------------
  87. LONG AGadget::GT_GetGadgetAttrsA (Window * win, Requester * req, TagItem * taglist)
  88. {
  89.  return ::GT_GetGadgetAttrsA(this, win, req, taglist);
  90. }
  91. //----------------------------------------------------------------------------
  92. void AGadget::GT_SetGadgetAttrs (Window * win, Requester * req, Tag tag1,  ...)
  93. {
  94.  ::GT_SetGadgetAttrs(this, win, req, tag1);
  95. }
  96. //----------------------------------------------------------------------------
  97. void AGadget::GT_SetGadgetAttrsA (Window * win, Requester * req, TagItem * taglist)
  98. {
  99.  ::GT_SetGadgetAttrsA(this, win, req, taglist);
  100. }
  101. //----------------------------------------------------------------------------
  102. void AGadget::GadgetMouse (GadgetInfo * gInfo, WORD * mousePoint)
  103. {
  104.  ::GadgetMouse(this, gInfo, mousePoint);
  105. }
  106. //----------------------------------------------------------------------------
  107. void AGadget::ModifyProp (Window * window, Requester * requester, unsigned long flags, unsigned long horizPot, unsigned long vertPot, unsigned long horizBody, unsigned long vertBody)
  108. {
  109.  ::ModifyProp(this, window, requester, flags, horizPot, vertPot, horizBody, vertBody);
  110. }
  111. //----------------------------------------------------------------------------
  112. void AGadget::NewModifyProp (Window * window, Requester * requester, unsigned long flags, unsigned long horizPot, unsigned long vertPot, unsigned long horizBody, unsigned long vertBody, long numGad)
  113. {
  114.  ::NewModifyProp(this, window, requester, flags, horizPot, vertPot, horizBody, vertBody, numGad);
  115. }
  116. //----------------------------------------------------------------------------
  117. void AGadget::OffGadget (Window * window, Requester * requester)
  118. {
  119.  ::OffGadget(this, window, requester);
  120. }
  121. //----------------------------------------------------------------------------
  122. void AGadget::OnGadget (Window * window, Requester * requester)
  123. {
  124.  ::OnGadget(this, window, requester);
  125. }
  126. //----------------------------------------------------------------------------
  127. void AGadget::RefreshGList (Window * window, Requester * requester, long numGad)
  128. {
  129.  ::RefreshGList(this, window, requester, numGad);
  130. }
  131. //----------------------------------------------------------------------------
  132. void AGadget::RefreshGadgets (Window * window, Requester * requester)
  133. {
  134.  ::RefreshGadgets(this, window, requester);
  135. }
  136. //----------------------------------------------------------------------------
  137. ULONG AGadget::SetGadgetAttrs (Window * window, Requester * requester, unsigned long tag1,  ...)
  138. {
  139.  return ::SetGadgetAttrs(this, window, requester, tag1);
  140. }
  141. //----------------------------------------------------------------------------
  142. ULONG AGadget::SetGadgetAttrsA (Window * window, Requester * requester, TagItem * tagList)
  143. {
  144.  return ::SetGadgetAttrsA(this, window, requester, tagList);
  145. }
  146.  
  147. #endif
  148.